package STUDENT.TRANDAODAIVI.ARRAY;

public class BT9 {
public static void main(String[] args) {
	int[] Employee0={2,4,3,4,5,8,8};
	int[] Employee1={7,3,4,3,3,4,4};
	int[] Employee2={3,3,4,3,3,2,2};
	int[] Employee3={9,3,4,7,3,4,1};
	int[] Employee4={3,5,4,3,6,3,8};
	int[] Employee5={3,4,4,6,3,4,4};
	int[] Employee6={3,7,4,8,3,8,4};
	int[] Employee7={6,3,5,9,2,7,9};
	int sum0=0,sum1=0,sum2=0,sum3=0,sum4=0,sum5=0,sum6=0,sum7=0;
	for (int i=0;i<Employee0.length;i++){
		sum0=Employee0[i]+sum0;
	}
	for (int i=0;i<Employee1.length;i++){
		sum1=Employee1[i]+sum1;
	}
	for (int i=0;i<Employee2.length;i++){
		sum2=Employee2[i]+sum2;
	}
	for (int i=0;i<Employee3.length;i++){
		sum3=Employee3[i]+sum3;
	}
	for (int i=0;i<Employee4.length;i++){
		sum4=Employee4[i]+sum4;
	}
	for (int i=0;i<Employee5.length;i++){
		sum5=Employee5[i]+sum5;
	}
	for (int i=0;i<Employee6.length;i++){
		sum6=Employee6[i]+sum6;
	}
	for (int i=0;i<Employee7.length;i++){
		sum7=Employee7[i]+sum7;
	}

	int[] sum={sum0,sum1,sum2,sum3,sum4,sum5,sum6,sum7};
	for (int i=0;i<8;i++){
		for (int j=i+1;j<8;j++){
			if(sum[i]<sum[j]){
				int x=sum[i];
				sum[i]=sum[j];
				sum[j]=x;
			}
		}
	}
	System.out.println("Sap xep: ");
	for (int i=0;i<8;i++){
		System.out.println("Employee"+i+" : "+sum[i]);
	}

}
}
